﻿if (!(window.console))
{
    window.console =
    {
        log:alert
    };
}
$(document).ready(function () {
    $("input[name=BoothType]").click(function () {
        var item = $(this);
        $("input[name=BoothType]").next().attr("disabled","true");
        item.next().removeAttr("disabled");
        //$("input[name=" + rev + "]").attr("disabled","true");
    });
});
function checkRegister()
{
    var requiredItems = $("*[required=true]");
    var checkResult = true;
    requiredItems.each(function ()
    {
        if (!$(this).val())
        {
            checkResult = false;
            showRequiredMessage(this);
        }
    });
    checkResult = checkxingzhi() && checkRequirement() && checkResult;
    if (!checkResult)
    {
        alert("* 为比必填项，请检查");
    }
    return checkResult;
}

function checkAccountRegister() {
    var requiredItems = $("*[required=true]");
    console.log(requiredItems.length);
    var checkResult = true;
    requiredItems.each(function () {
        if (!$(this).val()) {
            checkResult = false;
            showRequiredMessage(this);
        }
    });
    checkResult = checkxingzhi() && checkRequirement() && checkResult;
    if (!checkResult) {
        alert("* 为比必填项，请检查");
    }
    return checkResult;
}


function showRequiredMessage(item)
{
    $(item).addClass("miss requied");
}

function checkPassword() {
    
}

function checkxingzhi() 
{
    return $("input[name=xingzhi]:checked").length > 0;
}

function checkRequirement() 
{
    return $("input[name=Requirement]:checked").length > 0;
}
